package com.sniper.springmvc.action;

import com.sniper.springmvc.utils.HttpUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("public")
public class PublicAction extends RootController {

    @ResponseBody
    @RequestMapping("checkUrl")
    public int checkUrl(@RequestParam("url") String url) {
        return HttpUtil.isRealWebSite(url);
    }
}
